/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.hazard.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.close.common.constant.enums.ParkCloseSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;

/**
 * 危险品运输车辆
 *
 * @author pig
 * @date 2023-10-24 19:40:58
 */
@Data
@TableName(value = "closed_hazard_car", excludeProperty = "tenantId")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "危险品运输车辆")
public class ClosedHazardCarEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 危险品类型
	*/
    @Schema(description="危险品类型")
    private Integer hazardType;

	/**
	* 车牌号
	*/
    @Schema(description="车牌号")
    private String licencePlateNumber;

	/**
	* 行驶证
	*/
    @Schema(description="行驶证")
    private String vehicleLicense;

	/**
	* 驾驶员
	*/
    @Schema(description="驾驶员")
    private String driverName;

	/**
	* 驾驶员手机号
	*/
    @Schema(description="驾驶员手机号")
    private String driverPhone;

	/**
	* 驾驶员身份证
	*/
    @Schema(description="驾驶员身份证")
    private String driverIdNum;

	/**
	 * 驾驶员身份证图片
	 */
	@Schema(description="驾驶员身份证图片")
    private String driverIdImg;

	/**
	* 常用押运员
	*/
    @Schema(description="常用押运员")
    private String usualSupercargoName;

	/**
	* 常用押运员手机号
	*/
    @Schema(description="常用押运员手机号")
    private String usualSupercargoPhone;

	/**
	* 常用押运员身份证
	*/
    @Schema(description="常用押运员身份证")
    private String usualSupercargoIdNum;


	/**
	 * 常用押运员身份证图片
	 */
	@Schema(description="常用押运员身份证图片")
    private String usualSupercargoIdImg;

	/**
	* 是否使用
	*/
    @Schema(description="是否使用")
    private String useFlag;

	/**
	* 黑名单标志
	*/
    @Schema(description="黑名单标志")
    private String blacklistFlag;

	/**
	 * 是否在园区
	 */
	@Schema(description="是否在园区")
	private String inParkFlag;

	/**
	* 审核状态
	*/
    @Schema(description="审核状态")
    private Integer auditStatus;

	/**
	* 审核结果描述
	*/
    @Schema(description="审核结果描述")
    private String auditStatusDesc;

	/**
	 * 申请时间
	 */
	@Schema(description = "申请时间")
	private Date applyTime;


	@Schema(description = "审核时间")
	private Date auditTime;

	/**
	 * 申请人Id
	 */
	@Schema(description="申请人Id")
	private Long applyUserId;

	/**
	 * 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;


    public String getOrgIdStr() {
    	return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
	}


	public String getUseFlagStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getUseFlag());
	}

	public String getInParkFlagStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getInParkFlag());
	}

	public String getBlacklistFlagStr() {
    	return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getBlacklistFlag());
	}

	public String getHazardTypeStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_hazard_car_type, this.getHazardType());
	}

	public String getAuditStatusStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_hazard_car_audit_status, this.getAuditStatus());
	}

}
